<template>
	<view class="index">
		<view class="item" v-for="(item,index) in dataList" :key='index' @click="openDetail(item)">
			<view class="item-box">
				<view class="item-name u-line-1">{{item.name}}</view>
				<view class="item-num">票数:{{item.num}}</view>
			</view>
			<view class="item-box">
				<view class="">{{item.phone}}</view>
				<view class="item-time">{{item.date_creation | format}}</view>
			</view>
		</view>
		<sww-load-more :params="dataListParams" ></sww-load-more>
	</view>
</template>

<script>
	import {pagingMixin} from '@/mixins/sysPaging'
	import { formatDate } from '@/utils/moment'
	export default {
		mixins:[pagingMixin],
		props:{
			activityId:{
				type:[String,Number],
				default:''
			}
		},
		filters:{
			format(time){
				return formatDate(time,'YYYY-MM-DD HH:mm:ss')
			}
		},
		data(){
			return{
				
			}
		},
		methods:{
			init(){
				this._init_data('',{
					fk_info_id:this.activityId,
					fk_users_id:this.vuex_user.pk_id
				},{
					name:'b_vote_info_player'
				})
			},
			$onReachBottom(){
				this._load_data()
			},
			openDetail(row){
				this.$linkTo(`/package/activity/vote/detail/mineDetail?id=${row.pk_id}`)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.index{
		padding: 30rpx 30rpx 0;
		.item{
			width: 100%;
			background-color: #fff;
			border-radius: 20rpx;
			padding: 30rpx;
			margin-bottom: 20rpx;
			.item-name{
				flex: 3;
				font-size: 28rpx;
				padding-bottom: 20rpx;
				}
			.item-num{
				flex: 1;
				text-align: right;
			}
			.item-box{
				display: flex;
				align-items: center;
				justify-content: space-between;
				color: #999;
				.item-time{
					font-size: 22rpx;
				}
			}
		}
	}
</style>
